package com.ehotting.edsta.diagnosisPredict.feign.factory;

import com.ehotting.eaf.core.web.domain.diagnosisPredict.PageDto;
import com.ehotting.eaf.core.web.domain.diagnosisPredict.Response;
import com.ehotting.edsta.diagnosisPredict.domain.dto.*;
import com.ehotting.edsta.diagnosisPredict.feign.DiagnosisPredictFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 零散的算法模块接口归集的降级处理
 * 
 * @author edsta
 */
@Slf4j
@Component
public class DiagnosisPredictFallbackFactory implements FallbackFactory<DiagnosisPredictFeignService> {

    @Override
    public DiagnosisPredictFeignService create(Throwable throwable)
    {
        log.error("零散的算法模块接口归集调用失败:{}", throwable.getMessage());
        return new DiagnosisPredictFeignService() {
            @Override
            public Response<PageDto<PublishPredictTaskDto>> searchPredictTask(PredictListDto predictListDto) {
                return null;
            }

            @Override
            public Response<List<AlgorithmInfoDto>> getAlgorithmByType(String projectType) {
                return null;
            }

            @Override
            public Response<Boolean> publish(PublishTaskDataReqDto req) {
                return null;
            }

            @Override
            public Response<List<FeDatafield>> list(String createTime, Long datafileId, Long id, String name, String name2, String type) {
                return null;
            }

            @Override
            public Response<String> saveOrUpdateBatchFilterRule(FeFilterRule[] t) {
                return null;
            }

            @Override
            public Response<String> saveOrUpdateBatchMissingRule(FeMissingRule[] t) {
                return null;
            }

            @Override
            public Response<String> saveOrUpdateBatchDuplicateRule(FeDatafield[] t) {
                return null;
            }

            @Override
            public Response<String> saveOrUpdateBatchAttrCreateRule(FeAttributecreateRule[] t) {
                return null;
            }

            @Override
            public Response<String> saveOrUpdateBatchStandardRule(FeStandardRule[] t) {
                return null;
            }
        };
    }
}
